import React, { Component } from 'react';
import { Swiper } from 'antd-mobile'
class Pswipe extends Component {
    render() {
        // 接受传入的值
        let imgList = this.props.imgLists
        // console.log(imgList)
        let items
        if (imgList) {
            items = imgList.map((item, index) => {
                return (
                    <Swiper.Item key={index}>
                        <img src={item} alt="" />
                    </Swiper.Item>
                )
            })
        }
        return (
            <div className='pswipe'>
                <Swiper loop autoplay>{items}</Swiper>
            </div>
        );
    }
}

export default Pswipe;